package org.wzh.spring.di.demov;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.wzh.spring.di.demo1.CompactDisc;

@Component
@Qualifier("spel")
public class BlankDiscSpEL implements CompactDisc {

	private String title;
	private String artist;

	@Autowired
	public BlankDiscSpEL(@Value("#{properties['disc.title']}") String title, @Value("#{properties['disc.artist']}") String artist) {
		this.title = title;
		this.artist = artist;
	}

	@Override
	public void play() {
		// TODO Auto-generated method stub
		System.out.println("title = " + title + ", artist = " + artist);
	}

}
